export namespace model {
	
	export class Browse {
	    time_date: string;
	    number: number;
	
	    static createFrom(source: any = {}) {
	        return new Browse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.time_date = source["time_date"];
	        this.number = source["number"];
	    }
	}
	export class Good {
	    id: number;
	    name: string;
	    pic: string;
	    desc: string;
	    price: string;
	    stock: number;
	    unit: string;
	    sales: number;
	    status: number;
	    browses: Browse[];
	
	    static createFrom(source: any = {}) {
	        return new Good(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.id = source["id"];
	        this.name = source["name"];
	        this.pic = source["pic"];
	        this.desc = source["desc"];
	        this.price = source["price"];
	        this.stock = source["stock"];
	        this.unit = source["unit"];
	        this.sales = source["sales"];
	        this.status = source["status"];
	        this.browses = this.convertValues(source["browses"], Browse);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class GetSupplierGoodsDetailResponse {
	    code: number;
	    message: string;
	    data: Good;
	
	    static createFrom(source: any = {}) {
	        return new GetSupplierGoodsDetailResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	        this.data = this.convertValues(source["data"], Good);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class SupplierIndexData {
	    todayOrderNumber: number;
	    dailySalesTotal: string;
	    previousSalesTotal: string;
	    completedOrder: number;
	    shippedOrder: number;
	    pendingDeliveryConfirmationOrder: number;
	    cancelledOrder: number;
	    pending_shipment_order: number;
	    outOfStockRegistration: number;
	    listedProduct: number;
	    tightWarehouseInventory: number;
	    allProducts: number;
	    dailyBrowse: number;
	    previousBrowse: number;
	    monthBrowse: number;
	    allBrowse: number;
	
	    static createFrom(source: any = {}) {
	        return new SupplierIndexData(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.todayOrderNumber = source["todayOrderNumber"];
	        this.dailySalesTotal = source["dailySalesTotal"];
	        this.previousSalesTotal = source["previousSalesTotal"];
	        this.completedOrder = source["completedOrder"];
	        this.shippedOrder = source["shippedOrder"];
	        this.pendingDeliveryConfirmationOrder = source["pendingDeliveryConfirmationOrder"];
	        this.cancelledOrder = source["cancelledOrder"];
	        this.pending_shipment_order = source["pending_shipment_order"];
	        this.outOfStockRegistration = source["outOfStockRegistration"];
	        this.listedProduct = source["listedProduct"];
	        this.tightWarehouseInventory = source["tightWarehouseInventory"];
	        this.allProducts = source["allProducts"];
	        this.dailyBrowse = source["dailyBrowse"];
	        this.previousBrowse = source["previousBrowse"];
	        this.monthBrowse = source["monthBrowse"];
	        this.allBrowse = source["allBrowse"];
	    }
	}
	export class GetSupplierIndexResponse {
	    code: number;
	    message: string;
	    data: SupplierIndexData;
	
	    static createFrom(source: any = {}) {
	        return new GetSupplierIndexResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	        this.data = this.convertValues(source["data"], SupplierIndexData);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class Operate {
	    user: string;
	    operateTime: string;
	    orderStatus: number;
	    remark: string;
	
	    static createFrom(source: any = {}) {
	        return new Operate(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.user = source["user"];
	        this.operateTime = source["operateTime"];
	        this.orderStatus = source["orderStatus"];
	        this.remark = source["remark"];
	    }
	}
	export class UserAddress {
	    name: string;
	    phoneNumber: string;
	    address: string;
	
	    static createFrom(source: any = {}) {
	        return new UserAddress(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.name = source["name"];
	        this.phoneNumber = source["phoneNumber"];
	        this.address = source["address"];
	    }
	}
	export class Order {
	    id: number;
	    supplier: string;
	    user: string;
	    amount: string;
	    status: number;
	    create_time: string;
	    invoice: string;
	    logistics: number;
	    logistics_id: string;
	    receipt: string;
	    receiptInfo: UserAddress;
	    goodsInfo: Good[];
	    operateInfo: Operate[];
	
	    static createFrom(source: any = {}) {
	        return new Order(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.id = source["id"];
	        this.supplier = source["supplier"];
	        this.user = source["user"];
	        this.amount = source["amount"];
	        this.status = source["status"];
	        this.create_time = source["create_time"];
	        this.invoice = source["invoice"];
	        this.logistics = source["logistics"];
	        this.logistics_id = source["logistics_id"];
	        this.receipt = source["receipt"];
	        this.receiptInfo = this.convertValues(source["receiptInfo"], UserAddress);
	        this.goodsInfo = this.convertValues(source["goodsInfo"], Good);
	        this.operateInfo = this.convertValues(source["operateInfo"], Operate);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class GetSupplierOrderDataResponse {
	    code: number;
	    message: string;
	    data: Order[];
	
	    static createFrom(source: any = {}) {
	        return new GetSupplierOrderDataResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	        this.data = this.convertValues(source["data"], Order);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	
	export class LoginPassResponse {
	    code: number;
	    message: string;
	    token: string;
	    email: string;
	
	    static createFrom(source: any = {}) {
	        return new LoginPassResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	        this.token = source["token"];
	        this.email = source["email"];
	    }
	}
	
	
	export class SearchSupplierOrderResponse {
	    code: number;
	    message: string;
	    data: Order;
	
	    static createFrom(source: any = {}) {
	        return new SearchSupplierOrderResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	        this.data = this.convertValues(source["data"], Order);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class SendCodeResponse {
	    code: number;
	    message: string;
	
	    static createFrom(source: any = {}) {
	        return new SendCodeResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	    }
	}
	
	export class SupplierSearchGoodsResponse {
	    code: number;
	    message: string;
	    data: Good[];
	
	    static createFrom(source: any = {}) {
	        return new SupplierSearchGoodsResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.code = source["code"];
	        this.message = source["message"];
	        this.data = this.convertValues(source["data"], Good);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

